package com.demo.project_template.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 帖子评论
 * </p>
 *
 * @author 杨玉龙
 * @since 2024-08-20 11:48:57
 */
@Getter
@Setter
@TableName("t_post_comment")
@ApiModel(value = "PostComment对象", description = "帖子评论")
public class PostComment implements Serializable {

    private static final long serialVersionUID = 1L;

      @TableId("id")
    private Long id;

    @ApiModelProperty("帖子id")
    @TableField("post_id")
    private Long postId;

    @ApiModelProperty("用户id")
    @TableField("user_id")
    private Long userId;

    @ApiModelProperty("用户昵称")
    @TableField("user_nick_name")
    private String userNickName;

    @ApiModelProperty("用户头像")
    @TableField("user_avater")
    private String userAvater;

    @ApiModelProperty("评论内容")
    @TableField("content")
    private String content;

    @ApiModelProperty("评论父id")
    @TableField("pid")
    private Long pid;

    @ApiModelProperty("是否删除")
    @TableField("is_delete")
    @TableLogic
    private String isDelete;

    @ApiModelProperty("创建时间")
      @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty(value = "子评论")
    @TableField(exist = false)
    private List<PostComment> childComment;
}
